import style from './style.module.css'
interface Props {
    isCheck: boolean[]
    doRemove: () => void
}

export default function Disabled(props: Props) {
    let isPick = false
    for (let i = 0; i < props.isCheck.length; i++) {
        if (props.isCheck[i] === true) {
            isPick = true
            break
        }
    }
    if (isPick === false) {
        return (<button className={style.delete} disabled >删除</button>)
    } else {
        return (<button className={style.delete} onClick={() => props.doRemove()}>删除</button>)
    }
}